1. Field of the Invention
The present invention relates to a dimension measuring apparatus, a dimension measuring method, and a program for dimension measuring apparatus. More specifically, the present invention relates to improvement in dimension measuring apparatus which measures a dimension of a workpiece on a movable stage being movable in a Z direction based on an edge of a workpiece image obtained by photographing the workpiece.
2. Description of Related Art
In general, a dimension measuring apparatus is an apparatus for measuring a dimension of a workpiece based on an edge of a workpiece image obtained by photographing a workpiece, and may be called an image measuring apparatus (e.g., Unexamined Japanese Patent Publication No. 2009-300124, Unexamined Japanese Patent Publication No. 2009-300125, Unexamined Japanese Patent Publication No. 2010-19667). Normally, a workpiece is placed in a movable stage that is movable in X-axis, Y-axis and Z-axis directions. The movable stage is moved in the Z-axis direction to perform focus adjustment of the workpiece image, and moved in the X-axis and Y-axis directions to perform positioning of the workpiece within a field of view.
The workpiece image has an extremely accurate similar shape to that of the workpiece regardless of the position of the movable stage in the Z-axis direction, and hence determining a distance and an angle on the image can detect an actual dimension on the workpiece image. In the case of measuring the dimension of the workpiece by means of such a dimension measuring apparatus, increasing a photographing magnification can lead to improvement in measurement accuracy. However, a depth of field decreases with increase in photographing magnification, and hence in the case of a workpiece having a step exceeding the depth of field, only part of the workpiece is in focus. There has thus been a problem in that an entire image of the workpiece is difficult to grasp and measurement setting is not easy. Especially when a plurality of positions with different Z-directional heights in the workpiece are set as objects to be measured, in order to designate each of these positions as the object to be measured, it has been necessary to manually adjust a Z-directional position of the movable stage so as to perform focus adjustment. There has thus been a problem in that an operating procedure for measurement setting is complicated and it takes a long time to perform measurement setting.